<div class='right-cont right-cont-less' ng-controller='CourseSellLog'>
	<div class='title'>课程销售记录<i class='fa fa-spin fa-spinner' ng-if='loading'></i></div>
	<div class='content'>
        <ul class='nav nav-tabs nav-tabs-a'>
            <li class='active'>
                <a data-target='#list-all' data-toggle='tab'>全部</a>
            </li>
            <li><a data-target='#list-money' data-toggle='tab'>现金</a></li>
            <li><a data-target='#list-free' data-toggle='tab'>免费</a></li>
            <li><a data-target='#list-shopcart' data-toggle='tab'>购物车</a></li>
            <div class='box-search-key-date'>
                <div class='input-group input-group-date'>
                    <input type='text' class='form-control input-date' placeholder='起始时间'
                        ng-model='dateStart'>
                    <span class='input-group-addon'>至</span>
                    <input type='text' class='form-control input-date' placeholder='结束时间'
                        ng-model='dateEnd'>
                </div>
                <input type='text' class='form-control input-keyword' placeholder='[课程|用户]:[关键词]'
                    ng-model='keyword'>
                <button class='btn btn-primary' ng-click='load_data(1)'>搜索</button>
            </div>
        </ul>
        <div class='tab-content tab-content-a'>
            <div class='tab-pane fade in active' id='list-all'>
                <table class='table table-list'>
                    <tr>
                        <td>流水ID <span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>课程名称<span class='fa fa-sort'></span></td>
                        <td>购买时间<span class='fa fa-sort'></span></td>
                        <td>购买方式<span class='fa fa-sort'></span></td>
                        <td>购买价格<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in listA.list'>
                        <td>{{item.id || '未知'}}</td>
                        <td>{{item.nickname || '未知'}}</td>
                        <td>{{item.sim_course_name || '未知'}}</td>
                        <td>{{item.create_date || '未知'}}</td>
                        <td>{{item.get_type_text || '未知'}}</td>
                        <td>{{item.price || 0}}</td>
                        <td>
                            <span ng-if='item.status == 1' class='label label-primary'>
                                {{item.status_text}}
                            </span>
                            <span ng-if='item.status == 2' class='label label-warning'>
                                {{item.status_text}}
                            </span>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='tab-pane fade' id='list-money'>
                <table class='table table-list'>
                    <tr>
                        <td>流水ID <span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>课程名称<span class='fa fa-sort'></span></td>
                        <td>购买时间<span class='fa fa-sort'></span></td>
                        <td>购买方式<span class='fa fa-sort'></span></td>
                        <td>购买价格<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in listB.list'>
                        <td>{{item.id || '未知'}}</td>
                        <td>{{item.nickname || '未知'}}</td>
                        <td>{{item.sim_course_name || '未知'}}</td>
                        <td>{{item.create_date || '未知'}}</td>
                        <td>{{item.get_type_text || '未知'}}</td>
                        <td>{{item.price || 0}}</td>
                        <td>
                            <span ng-if='item.status == 1' class='label label-primary'>
                                {{item.status_text}}
                            </span>
                            <span ng-if='item.status == 2' class='label label-warning'>
                                {{item.status_text}}
                            </span>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='tab-pane fade' id='list-free'>
                <table class='table table-list'>
                    <tr>
                        <td>流水ID <span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>课程名称<span class='fa fa-sort'></span></td>
                        <td>购买时间<span class='fa fa-sort'></span></td>
                        <td>购买方式<span class='fa fa-sort'></span></td>
                        <td>购买价格<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in listC.list'>
                        <td>{{item.id || '未知'}}</td>
                        <td>{{item.nickname || '未知'}}</td>
                        <td>{{item.sim_course_name || '未知'}}</td>
                        <td>{{item.create_date || '未知'}}</td>
                        <td>{{item.get_type_text || '未知'}}</td>
                        <td>{{item.price || 0}}</td>
                        <td>
                            <span ng-if='item.status == 1' class='label label-primary'>
                                {{item.status_text}}
                            </span>
                            <span ng-if='item.status == 2' class='label label-warning'>
                                {{item.status_text}}
                            </span>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='tab-pane fade' id='list-shopcart'>
                <table class='table table-list'>
                    <tr>
                        <td>流水ID <span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>课程名称<span class='fa fa-sort'></span></td>
                        <td>购买时间<span class='fa fa-sort'></span></td>
                        <td>购买方式<span class='fa fa-sort'></span></td>
                        <td>购买价格<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in listE.list'>
                        <td>{{item.id || '未知'}}</td>
                        <td>{{item.nickname || '未知'}}</td>
                        <td>{{item.sim_course_name || '未知'}}</td>
                        <td>{{item.create_date || '未知'}}</td>
                        <td>{{item.get_type_text || '未知'}}</td>
                        <td>{{item.price || 0}}</td>
                        <td>
                            <span ng-if='item.status == 1' class='label label-primary'>
                                {{item.status_text}}
                            </span>
                            <span ng-if='item.status == 2' class='label label-warning'>
                                {{item.status_text}}
                            </span>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='box-page' ng-bind-html='pageHtml'></div>
        </div>
	</div>

    <!--交易详情模态窗-->
    <div class='modal fade userc-detail'>
        <div class='modal-dialog'>
            <div class='modal-content'> 
                <div class='modal-header'>
                    现金交易详情
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>
                <div class='modal-body'>
                    <table class='table-info'>
                        <tr>
                            <td>付款用户:</td>
                            <td>{{userCInfo.nickname || '未知'}}</td>
                            <td>交易金额:</td>
                            <td>{{moneyInfo.amount || 0}}</td>
                            <td>交易时间:</td>
                            <td>{{userCInfo.create_date || '未知'}}</td>
                        </tr>
                        <tr>
                            <td>交易单号:</td>
                            <td colspan='3'>{{moneyInfo.trade_no || '未知'}}</td>
                            <td>平台利润:</td>
                            <td>{{moneyInfo.profit || 0}}</td>
                        </tr>
                        <tr>
                            <td>优惠券码:</td>
                            <td colspan='3'>{{moneyInfo.code || '无'}}</td>
                            <td>抵扣金额:</td>
                            <td>{{moneyInfo.code_amount || '无'}}</td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>